package com.zhanggm.springcloud.order.service;

import com.zhanggm.springcloud.common.Order;
import org.springframework.stereotype.Service;

import java.util.Random;

@Service
public class OrderService {

    public Order getById(Integer id){
        Order order = new Order();
        order.setId(id);
        Random random = new Random();
        order.setOrderNo(random.nextInt()+"");
        order.setUserId(random.nextInt());
        return order;
    }

}
